package nc.pubimpl.so.m32.pfxx;

import nc.itf.scmpub.reference.uap.pf.PfServiceScmUtil;
import nc.pubimpl.so.pfxx.AbstractSOPfxxPlugin;
import nc.vo.pub.AggregatedValueObject;
import nc.vo.pub.BusinessException;
import nc.vo.scmpub.res.billtype.SOBillType;
import nc.vo.so.m32.entity.SaleInvoiceVO;






public class M32PfxxPlugin
  extends AbstractSOPfxxPlugin
{
  public M32PfxxPlugin() {}
  
  protected AggregatedValueObject insert(AggregatedValueObject vo) throws BusinessException
  {
    SaleInvoiceVO[] insertvo = { (SaleInvoiceVO)vo };
    

    SaleInvoiceVO[] retvos = (SaleInvoiceVO[])PfServiceScmUtil.processBatch("WRITE", SOBillType.Invoice.getCode(), insertvo, null, null);
    

    if ((null == retvos) || (retvos.length == 0)) {
      return null;
    }
    return retvos[0];
  }
  
  protected AggregatedValueObject update(AggregatedValueObject vo, String vopk) throws BusinessException
  {
    SaleInvoiceVO[] updatevo = { (SaleInvoiceVO)vo };
    

    SaleInvoiceVO[] retvos = (SaleInvoiceVO[])PfServiceScmUtil.processBatch("WRITE", SOBillType.Invoice.getCode(), updatevo, null, null);
    

    if ((null == retvos) || (retvos.length == 0)) {
      return null;
    }
    return retvos[0];
  }
}